import type { AddressParams } from '@/types/address'
import type { AddressItem } from '@/types/goodDetail'
import { http } from '@/utils/http/http'

/**添加收货地址 */
export const postMemberAddressApi = (data: AddressParams) => {
  return http({
    url: '/member/address',
    method: 'POST',
    data,
  })
}

/**获取收货地址列表 */
export const getMemberAddressListApi = () => {
  return http<AddressItem[]>({
    url: '/member/address',
    method: 'GET',
  })
}
